package com.ruoyi.commerce.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单业务对象 commerce_orders
 *
 * @author ruoyi
 * @date 2024-01-15
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class CommerceOrdersBo extends BaseEntity {

    /**
     * 订单号
     */
    @NotNull(message = "订单号不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 采购单号
     */
    private Long purchaseId;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 订单日期
     */
    @NotNull(message = "订单日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date orderDate;

    /**
     * 商品id
     */
    @NotNull(message = "商品id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 商品数量
     */
    @NotNull(message = "商品数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer productQuantity;

    /**
     * 总积分
     */
    @NotNull(message = "总积分不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal totalPrice;

    /**
     * 状态
     */
    private String status;


}
